<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Navo Portable Library: 伸展树</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Navo Portable Library&#160;<span id="projectnumber">Ver 1.0.20120827</span></div>
   <div id="projectbrief">Provides generic platform independent facilities.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">数据结构</a> &#124;
<a href="#define-members">宏定义</a> &#124;
<a href="#typedef-members">类型定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<h1>伸展树</h1>  </div>
<div class="ingroups"><a class="el" href="group___xE4_xBA_x8C_xE5_x8F_x89_xE6_xA0_x91.html">二叉树</a></div></div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
数据结构</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct____splaylnk__node.html">__splaylnk_node</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">伸展树节点  <a href="struct____splaylnk__node.html#_details">更多...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">树根  <a href="structsplaylnk__root.html#_details">更多...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsplaylnk__info.html">splaylnk_info</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">树信息表  <a href="structsplaylnk__info.html#_details">更多...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
宏定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga459d1dd1b0388a3116016c6f6f0bdd76">SPLAYLNK_ROOT</a>(name)&#160;&#160;&#160;<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> name = {NULL}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义一个名为name的树根，并对其初始化  <a href="#ga459d1dd1b0388a3116016c6f6f0bdd76"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga9913599b9f3015bb4519fd0bf8f2bd55">SPLAYLNK_NODE</a>(name)&#160;&#160;&#160;<a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> name = {NULL, NULL, NULL}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义一个名为name的节点，并对其初始化  <a href="#ga9913599b9f3015bb4519fd0bf8f2bd55"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga97c4beedce8280f4c0da51e39e9e4dba">SPLAYLNK_INFO</a>(name)&#160;&#160;&#160;<a class="el" href="structsplaylnk__info.html">splaylnk_info</a> name = {0, 0, 0}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义一个名为name的树信息表，并对其初始化  <a href="#ga97c4beedce8280f4c0da51e39e9e4dba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6cfeb8883fb82004328680139dfbd127"></a><!-- doxytag: member="伸展树::splaylnk_inc" ref="ga6cfeb8883fb82004328680139dfbd127" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga6cfeb8883fb82004328680139dfbd127">splaylnk_inc</a>(itr)&#160;&#160;&#160;((itr) = splaylnk_next(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器递增 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga116d136bf37eb1a0ffb58157e3c06f23"></a><!-- doxytag: member="伸展树::splaylnk_dec" ref="ga116d136bf37eb1a0ffb58157e3c06f23" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga116d136bf37eb1a0ffb58157e3c06f23">splaylnk_dec</a>(itr)&#160;&#160;&#160;((itr) = splaylnk_prev(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器递减 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2ccc72af8c152a19ede061ea516805bc"></a><!-- doxytag: member="伸展树::splaylnk_inc_later" ref="ga2ccc72af8c152a19ede061ea516805bc" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga2ccc72af8c152a19ede061ea516805bc">splaylnk_inc_later</a>(itr)&#160;&#160;&#160;__splaylnk_inc_later(itr, &amp;(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器后自增 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gafef1af602fbe8324144e108ea3eb3de4"></a><!-- doxytag: member="伸展树::splaylnk_dec_later" ref="gafef1af602fbe8324144e108ea3eb3de4" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gafef1af602fbe8324144e108ea3eb3de4">splaylnk_dec_later</a>(itr)&#160;&#160;&#160;__splaylnk_dec_later(itr, &amp;(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器后自减 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga89842a2c5280c53314fcca579a625b39">splaylnk_foreach</a>(_begin, _end, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">正向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏  <a href="#ga89842a2c5280c53314fcca579a625b39"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga2b8fc5d56894e2cdbe104e6841ac0a0b">splaylnk_reverse_foreach</a>(_rbegin, _rend, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">逆向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏  <a href="#ga2b8fc5d56894e2cdbe104e6841ac0a0b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaee5f30c6073ff1b5ff61aa49a4e1b3e6">SPLAYLNK_RECURSE_PROC</a>(name, type, param)&#160;&#160;&#160;void name(type * param)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义递归遍历回调函数  <a href="#gaee5f30c6073ff1b5ff61aa49a4e1b3e6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga35422cff5b679c86164f7d5f4fc9f33e">splaylnk_recurse_foreach</a>(root, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">正向递归遍历整个树  <a href="#ga35422cff5b679c86164f7d5f4fc9f33e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaa5cd9e3a0e58373e79af482c36d30ce7">splaylnk_recurse_reverse_foreach</a>(root, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">逆向递归遍历整个树  <a href="#gaa5cd9e3a0e58373e79af482c36d30ce7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaea739ab35bbd5434a9ab35468ef78bb5">splaylnk_search</a>(root, newly, greater, res, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">搜索树中的某个节点  <a href="#gaea739ab35bbd5434a9ab35468ef78bb5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga0a9f60007851a8069b5cd7968f2829cd">splaylnk_insert</a>(root, newly, greater, res, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">插入新节点(伸展)  <a href="#ga0a9f60007851a8069b5cd7968f2829cd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga1a27b1f3785635d8776aa390682cb54b">splaylnk_semi_insert</a>(root, newly, greater, res, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">插入新节点(半伸展)  <a href="#ga1a27b1f3785635d8776aa390682cb54b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga3b4c9997a7ac852a073efff7579e298b">splaylnk_serialize</a>(root, buf, type, member)&#160;&#160;&#160;__splaylnk_serialize(root, (void**)(buf), offset_of(type, member))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">将树进行序列化为一个有序序列  <a href="#ga3b4c9997a7ac852a073efff7579e298b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaf97a19ddb43b97be82103097ecad127b">splaylnk_deserialize</a>(root, buf, cnt, type, member)&#160;&#160;&#160;__splaylnk_deserialize(root, (char**)(buf), cnt, offset_of(type, member))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">根据树的序列进行反序列化为一个完整的树  <a href="#gaf97a19ddb43b97be82103097ecad127b"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
类型定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga86d63f86085373735ef646def7b11623"></a><!-- doxytag: member="伸展树::splaylnk_node" ref="ga86d63f86085373735ef646def7b11623" args="" -->
typedef struct <a class="el" href="struct____splaylnk__node.html">__splaylnk_node</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga86d63f86085373735ef646def7b11623">splaylnk_node</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">节点 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad419d6203da790205c3ced27085c87ad"></a><!-- doxytag: member="伸展树::splaylnk_iter" ref="gad419d6203da790205c3ced27085c87ad" args="" -->
typedef struct <a class="el" href="struct____splaylnk__node.html">__splaylnk_node</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gad419d6203da790205c3ced27085c87ad">splaylnk_iter</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac07a47df24523e66c8f37863d68b3d59"></a><!-- doxytag: member="伸展树::splaylnk_pr1" ref="gac07a47df24523e66c8f37863d68b3d59" args=")(splaylnk_node *)" -->
typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gac07a47df24523e66c8f37863d68b3d59">splaylnk_pr1</a> )(<a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">单参数回调函数指针 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga379a0cb9429df29cf1fdda06a4f6f106"></a><!-- doxytag: member="伸展树::splaylnk_pr2" ref="ga379a0cb9429df29cf1fdda06a4f6f106" args=")(splaylnk_node *, splaylnk_node *)" -->
typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga379a0cb9429df29cf1fdda06a4f6f106">splaylnk_pr2</a> )(<a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *, <a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">双参数回调函数指针 <br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga96a0390c48c3efce2bfcc0d8e169d02c">splaylnk_count</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">获取树的节点总数  <a href="#ga96a0390c48c3efce2bfcc0d8e169d02c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga184ab3bc7e5856c525fa69b1c0894dc7">splaylnk_distance</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> first, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> last)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算两个节点的迭代距离  <a href="#ga184ab3bc7e5856c525fa69b1c0894dc7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga54bf3a666d7d44370c76f84ebb016dfa">splaylnk_index_of</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算迭代器的正向索引  <a href="#ga54bf3a666d7d44370c76f84ebb016dfa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gab24b1de0094f3caac4b04b22ecc9006e">splaylnk_reverse_index_of</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算迭代器的逆向索引  <a href="#gab24b1de0094f3caac4b04b22ecc9006e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gab8d130bbc63ec59e932b631666893aeb">splaylnk_depth</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算树的深度  <a href="#gab8d130bbc63ec59e932b631666893aeb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gad3e72453d2045135cb2f4ea45e170ebf">splaylnk_leafs</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算树的叶子数  <a href="#gad3e72453d2045135cb2f4ea45e170ebf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga047a6df159da0ec6e9b865a81cdbd2ad">splaylnk_get_info</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="structsplaylnk__info.html">splaylnk_info</a> *info)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">获取树的信息，包括节点数、深度、叶子数  <a href="#ga047a6df159da0ec6e9b865a81cdbd2ad"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gada68906d6a788a0c39d67127f037e875">splaylnk_splay</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *node, <a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *parent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">对节点进行伸展调整  <a href="#gada68906d6a788a0c39d67127f037e875"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaaa0524284fb74c268dde8f245219f34f">splaylnk_semisplay</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *node, <a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *parent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">对节点进行半伸展调整  <a href="#gaaa0524284fb74c268dde8f245219f34f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga5a5a89278bf4369487a3fbd73fa76f3f">splaylnk_erase</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *entry)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">移除某个节点(伸展)  <a href="#ga5a5a89278bf4369487a3fbd73fa76f3f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga967ec8dd9063af617b682ea2760f1829">splaylnk_semierase</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *entry)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">移除某个节点(半伸展)  <a href="#ga967ec8dd9063af617b682ea2760f1829"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaf8b8aa25afe97aafae97b716b29ef460">splaylnk_erases</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> begin, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> end, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gac07a47df24523e66c8f37863d68b3d59">splaylnk_pr1</a> erase_handler)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">移除区域内的节点(伸展)  <a href="#gaf8b8aa25afe97aafae97b716b29ef460"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaabe47843d251d2e8d3d9560e163af0ef">splaylnk_semierases</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> begin, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> end, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gac07a47df24523e66c8f37863d68b3d59">splaylnk_pr1</a> erase_handler)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">移除区域内的节点(半伸展)  <a href="#gaabe47843d251d2e8d3d9560e163af0ef"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gac499691fdb6e46b0246fc7912c306282">splaylnk_init</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化树根  <a href="#gac499691fdb6e46b0246fc7912c306282"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga328c554736cee464fd77d3e0e4135a05">splaylnk_empty</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断树是否为空  <a href="#ga328c554736cee464fd77d3e0e4135a05"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa1534c1916d544ccede080abe45958db"></a><!-- doxytag: member="伸展树::__splaylnk_singular" ref="gaa1534c1916d544ccede080abe45958db" args="(splaylnk_node *root)" -->
static int&#160;</td><td class="memItemRight" valign="bottom"><b>__splaylnk_singular</b> (<a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *root)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gad807475fbd018c7899fc328d891ce1e8">splaylnk_singular</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断树是否只有单个节点  <a href="#gad807475fbd018c7899fc328d891ce1e8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga0d09988d46c22176f1f37ad3da562781">splaylnk_serialable</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断树是否可以序列化  <a href="#ga0d09988d46c22176f1f37ad3da562781"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga208a3a7318ac6710042ecdc877368ef2">splaylnk_left</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到左子节点  <a href="#ga208a3a7318ac6710042ecdc877368ef2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga83961643a16aafa16240f70e67960bc1">splaylnk_right</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到右子节点  <a href="#ga83961643a16aafa16240f70e67960bc1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga59c8e5d7719e7d97ef4d7b15ac31a4ff">splaylnk_parent</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到父节点  <a href="#ga59c8e5d7719e7d97ef4d7b15ac31a4ff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gacda2bc982d5a1762266955df6ae730b1">splaylnk_is_root</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断当前节点是否是根节点  <a href="#gacda2bc982d5a1762266955df6ae730b1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga07e12040dce0fbf4e87bb924cf43614b">splaylnk_is_leaf</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断当前节点是否是叶子节点  <a href="#ga07e12040dce0fbf4e87bb924cf43614b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga23d333a84fee4942e550609f5cf08f6b">splaylnk_link</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> newly, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> parent, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> *plink)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">链接两个节点  <a href="#ga23d333a84fee4942e550609f5cf08f6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga0bc6c60eab55d8b1ff543b3bbd430277">splaylnk_set_parent_if</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *node, <a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *parent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">仅在node不为空时，设置node的父节点  <a href="#ga0bc6c60eab55d8b1ff543b3bbd430277"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gabefb35778426452b53bc6a2a462a7548">splaylnk_node_init</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化节点  <a href="#gabefb35778426452b53bc6a2a462a7548"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaf66fad4729c1d2764ec32eee101b89d7">splaylnk_iter_replace</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> victim, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> newly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">用新节点替换旧节点  <a href="#gaf66fad4729c1d2764ec32eee101b89d7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaf49efefae965d599b54b7006507430da">splaylnk_replace</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *victim, <a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *newly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">用新的树根替换旧树根  <a href="#gaf49efefae965d599b54b7006507430da"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga9d10b0aaef216b49f5f3b979746c130b">splaylnk_swap</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *a, <a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">交换两个树  <a href="#ga9d10b0aaef216b49f5f3b979746c130b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaa1f8902531ce41d20ed3fd88d6f8de69">splaylnk_exist</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断一个节点是否存在于树中  <a href="#gaa1f8902531ce41d20ed3fd88d6f8de69"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga8ad8cae719494a3f15d181e8b9f4dc5b">splaylnk_at</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, size_t index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到正向索引对应的节点的迭代器  <a href="#ga8ad8cae719494a3f15d181e8b9f4dc5b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga2588af8914cc7c4399ca3b4dcd3a8d1e">splaylnk_reverse_at</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, size_t index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到逆向索引对应的节点的迭代器  <a href="#ga2588af8914cc7c4399ca3b4dcd3a8d1e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga4ea94db03f94aba84fb246f474a87df4">splaylnk_front</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到树的最左端节点  <a href="#ga4ea94db03f94aba84fb246f474a87df4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gab9dc4ef36e511ad52d1f16c167b1facd">splaylnk_back</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到树的最右端节点  <a href="#gab9dc4ef36e511ad52d1f16c167b1facd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga2e0c221b5e448b08815f57083ab7f88d">splaylnk_begin</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向正向起始位置的迭代器  <a href="#ga2e0c221b5e448b08815f57083ab7f88d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga974718d49f7e2ffec9a0512f75144d10">splaylnk_end</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向正向终止位置的迭代器  <a href="#ga974718d49f7e2ffec9a0512f75144d10"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga195070ea85dfd413a26d9d060cd0ec5c">splaylnk_end_of</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前迭代器的正向终止位置  <a href="#ga195070ea85dfd413a26d9d060cd0ec5c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gab60f4495e69b5698230fd1e6f4f655ec">splaylnk_rbegin</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向逆向起始位置的迭代器  <a href="#gab60f4495e69b5698230fd1e6f4f655ec"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga35ce6d814ceb12ede0d7ce2dc6c319f4">splaylnk_rend</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向逆向终止位置的迭代器  <a href="#ga35ce6d814ceb12ede0d7ce2dc6c319f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga6df1dae359180f19397c1ef01bbe1ccc">splaylnk_rend_of</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前迭代器的逆向终止位置  <a href="#ga6df1dae359180f19397c1ef01bbe1ccc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga6fc0567f0310442cab65da24be50f6c6">splaylnk_next</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前节点的中序后继节点  <a href="#ga6fc0567f0310442cab65da24be50f6c6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga31c7ab1c0c602384c51537bc8c36cc4b">splaylnk_prev</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前节点的中序前驱节点  <a href="#ga31c7ab1c0c602384c51537bc8c36cc4b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga270dd16e098a16b9631eb0a8f712ffb4">splaylnk_advance</a> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> cur, int dist)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">给迭代器增加一段距离或减小一段距离  <a href="#ga270dd16e098a16b9631eb0a8f712ffb4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga7ce5153a6d1b663eae23b1afcf97d0c7">splaylnk_clear</a> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gac07a47df24523e66c8f37863d68b3d59">splaylnk_pr1</a> erase_handler)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">清空树  <a href="#ga7ce5153a6d1b663eae23b1afcf97d0c7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1f937b1e9eec0a3fffb84c64323e01b3"></a><!-- doxytag: member="伸展树::__splaylnk_inc_later" ref="ga1f937b1e9eec0a3fffb84c64323e01b3" args="(splaylnk_iter cur, splaylnk_iter *p)" -->
static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><b>__splaylnk_inc_later</b> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> cur, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> *p)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga689f0d658c1af15659e120d3580450bf"></a><!-- doxytag: member="伸展树::__splaylnk_dec_later" ref="ga689f0d658c1af15659e120d3580450bf" args="(splaylnk_iter cur, splaylnk_iter *p)" -->
static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><b>__splaylnk_dec_later</b> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> cur, <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> *p)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaeba0886c52c9dceea48852dbc561d0fa"></a><!-- doxytag: member="伸展树::__do_splaylnk_recurse_foreach" ref="gaeba0886c52c9dceea48852dbc561d0fa" args="(splaylnk_iter cur, void(*fn)(void *), size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__do_splaylnk_recurse_foreach</b> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> cur, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3c48df0336ea5f2fa12b6e054032a84b"></a><!-- doxytag: member="伸展树::__do_splaylnk_recurse_reverse_foreach" ref="ga3c48df0336ea5f2fa12b6e054032a84b" args="(splaylnk_iter cur, void(*fn)(void *), size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__do_splaylnk_recurse_reverse_foreach</b> (<a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> cur, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga76880bd4ef3c886c3fdab04a4de17ccb"></a><!-- doxytag: member="伸展树::__splaylnk_recurse_foreach" ref="ga76880bd4ef3c886c3fdab04a4de17ccb" args="(splaylnk_root *root, void(*fn)(void *), size_t offset)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>__splaylnk_recurse_foreach</b> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga676106ab6724c46a442fac7794e60a1c"></a><!-- doxytag: member="伸展树::__splaylnk_recurse_reverse_foreach" ref="ga676106ab6724c46a442fac7794e60a1c" args="(splaylnk_root *root, void(*fn)(void *), size_t offset)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>__splaylnk_recurse_reverse_foreach</b> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaad2e41591f9a119c3fb7133700181b0e"></a><!-- doxytag: member="伸展树::__splaylnk_serialize" ref="gaad2e41591f9a119c3fb7133700181b0e" args="(splaylnk_root *root, void **buf, size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__splaylnk_serialize</b> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, void **buf, size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabdc2359a82255be25503cf2ae3d1fcb0"></a><!-- doxytag: member="伸展树::__splaylnk_deserialize" ref="gabdc2359a82255be25503cf2ae3d1fcb0" args="(splaylnk_root *root, char **buf, size_t cnt, size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__splaylnk_deserialize</b> (<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *root, char **buf, size_t cnt, size_t offset)</td></tr>
</table>
<hr/><h2>宏定义文档</h2>
<a class="anchor" id="ga459d1dd1b0388a3116016c6f6f0bdd76"></a><!-- doxytag: member="splaylnk.h::SPLAYLNK_ROOT" ref="ga459d1dd1b0388a3116016c6f6f0bdd76" args="(name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPLAYLNK_ROOT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="structsplaylnk__root.html">splaylnk_root</a> name = {NULL}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义一个名为name的树根，并对其初始化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>树根名称 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00081">81</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga9913599b9f3015bb4519fd0bf8f2bd55"></a><!-- doxytag: member="splaylnk.h::SPLAYLNK_NODE" ref="ga9913599b9f3015bb4519fd0bf8f2bd55" args="(name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPLAYLNK_NODE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> name = {NULL, NULL, NULL}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义一个名为name的节点，并对其初始化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>节点名称 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00082">82</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga97c4beedce8280f4c0da51e39e9e4dba"></a><!-- doxytag: member="splaylnk.h::SPLAYLNK_INFO" ref="ga97c4beedce8280f4c0da51e39e9e4dba" args="(name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPLAYLNK_INFO</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="structsplaylnk__info.html">splaylnk_info</a> name = {0, 0, 0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义一个名为name的树信息表，并对其初始化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>名称 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00083">83</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga89842a2c5280c53314fcca579a625b39"></a><!-- doxytag: member="splaylnk.h::splaylnk_foreach" ref="ga89842a2c5280c53314fcca579a625b39" args="(_begin, _end, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define splaylnk_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_begin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_end, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> _q_e = (_end);                        \
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> _q_f = (_begin);                      \
        <span class="keywordflow">while</span> (_q_f != _q_e) {                              \
            type * _q_t = container_of(_q_f, type, member); \
            <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga6cfeb8883fb82004328680139dfbd127" title="迭代器递增">splaylnk_inc</a>(_q_f);                             \
            fn(_q_t);                                       \
        }                                                   \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>正向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">_begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">_end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00775">775</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga2b8fc5d56894e2cdbe104e6841ac0a0b"></a><!-- doxytag: member="splaylnk.h::splaylnk_reverse_foreach" ref="ga2b8fc5d56894e2cdbe104e6841ac0a0b" args="(_rbegin, _rend, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define splaylnk_reverse_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_rbegin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_rend, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> _q_e = (_rend);                       \
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> _q_f = (_rbegin);                     \
        <span class="keywordflow">while</span> (_q_f != _q_e) {                              \
            type * _q_t = container_of(_q_f, type, member); \
            <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga116d136bf37eb1a0ffb58157e3c06f23" title="迭代器递减">splaylnk_dec</a>(_q_f);                             \
            fn(_q_t);                                       \
        }                                                   \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>逆向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">_rbegin</td><td>逆向起始位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">_rend</td><td>逆向终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00794">794</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaee5f30c6073ff1b5ff61aa49a4e1b3e6"></a><!-- doxytag: member="splaylnk.h::SPLAYLNK_RECURSE_PROC" ref="gaee5f30c6073ff1b5ff61aa49a4e1b3e6" args="(name, type, param)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPLAYLNK_RECURSE_PROC</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">param&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;void name(type * param)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义递归遍历回调函数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>函数名 </td></tr>
    <tr><td class="paramname">type</td><td>节点拥有者类型 </td></tr>
    <tr><td class="paramname">param</td><td>参数名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga35422cff5b679c86164f7d5f4fc9f33e" title="正向递归遍历整个树">splaylnk_recurse_foreach</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaa5cd9e3a0e58373e79af482c36d30ce7" title="逆向递归遍历整个树">splaylnk_recurse_reverse_foreach</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00832">832</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga35422cff5b679c86164f7d5f4fc9f33e"></a><!-- doxytag: member="splaylnk.h::splaylnk_recurse_foreach" ref="ga35422cff5b679c86164f7d5f4fc9f33e" args="(root, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define splaylnk_recurse_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment">__splaylnk_recurse_foreach(root, (<span class="keywordtype">void</span> (*)(<span class="keywordtype">void</span>*))(fn), \
            offset_of(type, member))
</pre></div>
<p>正向递归遍历整个树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaee5f30c6073ff1b5ff61aa49a4e1b3e6" title="定义递归遍历回调函数">SPLAYLNK_RECURSE_PROC</a>(PrintNode, DATA, node)
    {
        printf(<span class="stringliteral">&quot;%3d &quot;</span>, node-&gt;data);
    }

    <span class="comment">// 打印整个树</span>
    <span class="keywordtype">void</span> PrintAVLTree(<a class="code" href="structsplaylnk__root.html" title="树根">splaylnk_root</a>* root)
    {
        <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga35422cff5b679c86164f7d5f4fc9f33e" title="正向递归遍历整个树">splaylnk_recurse_foreach</a>(root, PrintNode, DATA, node);
        putchar(<span class="charliteral">&#39;\n&#39;</span>);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaa5cd9e3a0e58373e79af482c36d30ce7" title="逆向递归遍历整个树">splaylnk_recurse_reverse_foreach</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaee5f30c6073ff1b5ff61aa49a4e1b3e6" title="定义递归遍历回调函数">SPLAYLNK_RECURSE_PROC</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00857">857</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa5cd9e3a0e58373e79af482c36d30ce7"></a><!-- doxytag: member="splaylnk.h::splaylnk_recurse_reverse_foreach" ref="gaa5cd9e3a0e58373e79af482c36d30ce7" args="(root, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define splaylnk_recurse_reverse_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment">__splaylnk_recurse_reverse_foreach(root, (<span class="keywordtype">void</span> (*)(<span class="keywordtype">void</span>*))(fn), \
            offset_of(type, member))
</pre></div>
<p>逆向递归遍历整个树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga35422cff5b679c86164f7d5f4fc9f33e" title="正向递归遍历整个树">splaylnk_recurse_foreach</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaee5f30c6073ff1b5ff61aa49a4e1b3e6" title="定义递归遍历回调函数">SPLAYLNK_RECURSE_PROC</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00870">870</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaea739ab35bbd5434a9ab35468ef78bb5"></a><!-- doxytag: member="splaylnk.h::splaylnk_search" ref="gaea739ab35bbd5434a9ab35468ef78bb5" args="(root, newly, greater, res, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define splaylnk_search</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">newly, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">res, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="structsplaylnk__root.html" title="树根">splaylnk_root</a>* _k_r = (root);                           \
        type * _k_pn = (newly);                                 \
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> _k_p = _k_r-&gt;<a class="code" href="structsplaylnk__root.html#ad1a7b82ff33bd008821a73024d7c3576" title="根节点">node</a>;                        \
        (res) = NULL;                                           \
        <span class="keywordflow">while</span> (_k_p) {                                          \
            type * _k_pr = container_of(_k_p, type, member);    \
            <span class="keywordflow">if</span> (greater(_k_pr, _k_pn))                          \
                _k_p = _k_p-&gt;<a class="code" href="struct____splaylnk__node.html#adbcf818bcfba554a383e453874ad29a4" title="右子节点">right</a>;                             \
            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (greater(_k_pn, _k_pr))                     \
                _k_p = _k_p-&gt;<a class="code" href="struct____splaylnk__node.html#aa0ed7aab4acf06a006c61aa96e4cd5a1" title="左子节点">left</a>;                              \
            <span class="keywordflow">else</span> {                                              \
                (res) = _k_p; <span class="keywordflow">break</span>;                            \
            }                                                   \
        }                                                       \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>搜索树中的某个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">newly</td><td>用于搜索的临时节点，类型是type，该节点使用与搜索的值相同的值 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater</td><td>比较函数或宏。 升序:(i-&gt;data &gt; j-&gt;data) 降序:(i-&gt;data &lt; j-&gt;data) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>返回值。返回目标节点，若为NULL表示找不到节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> node_15;
    DATA* p = (DATA*)malloc(<span class="keyword">sizeof</span>(DATA));
    <span class="keywordflow">if</span> (!p)
        <span class="keywordflow">return</span> NULL;

    p-&gt;data = 15;

    <span class="comment">//查找值为15的节点</span>
    <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaea739ab35bbd5434a9ab35468ef78bb5" title="搜索树中的某个节点">splaylnk_search</a>(&amp;root, p, DATA_Greater, node_15, DATA, node);
    <span class="keywordflow">if</span> (!node_15)
        <span class="keywordflow">return</span> NULL;

    <span class="keywordflow">return</span> node_15;
</pre></div> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00902">902</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga0a9f60007851a8069b5cd7968f2829cd"></a><!-- doxytag: member="splaylnk.h::splaylnk_insert" ref="ga0a9f60007851a8069b5cd7968f2829cd" args="(root, newly, greater, res, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define splaylnk_insert</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">newly, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">res, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="structsplaylnk__root.html" title="树根">splaylnk_root</a>* _k_r = (root);                                   \
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a>* _k_pp = &amp;_k_r-&gt;<a class="code" href="structsplaylnk__root.html#ad1a7b82ff33bd008821a73024d7c3576" title="根节点">node</a>;                             \
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> _k_n = (newly);                                   \
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> _k_p;                                             \
        type * _k_pn = container_of(_k_n, type, member);                \
        (res) = 1;                                                      \
        <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gabefb35778426452b53bc6a2a462a7548" title="初始化节点">splaylnk_node_init</a>(_k_n);                                       \
        <span class="keywordflow">while</span> (*_k_pp) {                                                \
            type * _k_pr = container_of(_k_p = *_k_pp, type, member);   \
            <span class="keywordflow">if</span> (greater(_k_pr, _k_pn))                                  \
                _k_pp = &amp;_k_p-&gt;<a class="code" href="struct____splaylnk__node.html#aa0ed7aab4acf06a006c61aa96e4cd5a1" title="左子节点">left</a>;                                    \
            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (greater(_k_pn, _k_pr))                             \
                _k_pp = &amp;_k_p-&gt;<a class="code" href="struct____splaylnk__node.html#adbcf818bcfba554a383e453874ad29a4" title="右子节点">right</a>;                                   \
            <span class="keywordflow">else</span> {                                                      \
                (res) = 0; <span class="keywordflow">break</span>;                                       \
            }                                                           \
        }                                                               \
        <span class="keywordflow">if</span> (res) {                                                      \
            <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga23d333a84fee4942e550609f5cf08f6b" title="链接两个节点">splaylnk_link</a>(_k_n, _k_p, _k_pp);                           \
            <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gada68906d6a788a0c39d67127f037e875" title="对节点进行伸展调整">splaylnk_splay</a>(_k_r, _k_n, _k_p);                           \
        }                                                               \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>插入新节点(伸展) </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">newly</td><td>新节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater</td><td>比较函数或宏。 升序:(i-&gt;data &gt; j-&gt;data) 降序:(i-&gt;data &lt; j-&gt;data) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>返回值。返回1表示成功；若为0表示节点有冲突，无法插入 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordtype">int</span> ret;
    DATA* p = (DATA*)malloc(<span class="keyword">sizeof</span>(DATA));
    <span class="keywordflow">if</span> (!p)
        <span class="keywordflow">return</span> 0;

    p-&gt;data = 88;

    <span class="comment">//插入值为88的节点(伸展)</span>
    <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga0a9f60007851a8069b5cd7968f2829cd" title="插入新节点(伸展)">splaylnk_insert</a>(&amp;root, &amp;p-&gt;node, DATA_Greater, ret, DATA, node);
    <span class="keywordflow">if</span> (!ret)
        <span class="keywordflow">return</span> 0;

    <span class="keywordflow">return</span> 1;
</pre></div> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00947">947</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga1a27b1f3785635d8776aa390682cb54b"></a><!-- doxytag: member="splaylnk.h::splaylnk_semi_insert" ref="ga1a27b1f3785635d8776aa390682cb54b" args="(root, newly, greater, res, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define splaylnk_semi_insert</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">newly, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">res, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="structsplaylnk__root.html" title="树根">splaylnk_root</a>* _k_r = (root);                       \
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a>* _k_pp = &amp;_k_r-&gt;<a class="code" href="structsplaylnk__root.html#ad1a7b82ff33bd008821a73024d7c3576" title="根节点">node</a>;                 \
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> _k_n = (newly);                       \
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> _k_p;                                 \
        type * _k_pn = container_of(_k_n, type, member);    \
        (res) = 1;                                          \
        <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gabefb35778426452b53bc6a2a462a7548" title="初始化节点">splaylnk_node_init</a>(_k_n);                           \
        <span class="keywordflow">while</span> (*_k_pp) {                                    \
            _k_p = *_k_pp;                                  \
            _k_pr = container_of(_k_p, type, member);       \
            <span class="keywordflow">if</span> (greater(_k_pr, _k_pn))                      \
                _k_pp = &amp;_k_p-&gt;<a class="code" href="struct____splaylnk__node.html#aa0ed7aab4acf06a006c61aa96e4cd5a1" title="左子节点">left</a>;                        \
            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (greater(_k_pn, _k_pr))                 \
                _k_pp = &amp;_k_p-&gt;<a class="code" href="struct____splaylnk__node.html#adbcf818bcfba554a383e453874ad29a4" title="右子节点">right</a>;                       \
            <span class="keywordflow">else</span> {                                          \
                (res) = 0; <span class="keywordflow">break</span>;                           \
            }                                               \
        }                                                   \
        <span class="keywordflow">if</span> (res) {                                          \
            <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga23d333a84fee4942e550609f5cf08f6b" title="链接两个节点">splaylnk_link</a>(_k_n, _k_p, _k_pp);               \
            <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaaa0524284fb74c268dde8f245219f34f" title="对节点进行半伸展调整">splaylnk_semisplay</a>(_k_r, _k_n, _k_p);           \
        }                                                   \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>插入新节点(半伸展) </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">newly</td><td>新节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater</td><td>比较函数或宏。 升序:(i-&gt;data &gt; j-&gt;data) 降序:(i-&gt;data &lt; j-&gt;data) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>返回值。返回1表示成功；若为0表示节点有冲突，无法插入 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordtype">int</span> ret;
    DATA* p = (DATA*)malloc(<span class="keyword">sizeof</span>(DATA));
    <span class="keywordflow">if</span> (!p)
        <span class="keywordflow">return</span> 0;

    p-&gt;data = 88;

    <span class="comment">//插入值为88的节点(半伸展)</span>
    <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga1a27b1f3785635d8776aa390682cb54b" title="插入新节点(半伸展)">splaylnk_semi_insert</a>(&amp;root, &amp;p-&gt;node, DATA_Greater, ret, DATA, node);
    <span class="keywordflow">if</span> (!ret)
        <span class="keywordflow">return</span> 0;

    <span class="keywordflow">return</span> 1;
</pre></div> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00999">999</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga3b4c9997a7ac852a073efff7579e298b"></a><!-- doxytag: member="splaylnk.h::splaylnk_serialize" ref="ga3b4c9997a7ac852a073efff7579e298b" args="(root, buf, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define splaylnk_serialize</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">buf, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;__splaylnk_serialize(root, (void**)(buf), offset_of(type, member))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>将树进行序列化为一个有序序列 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>序列缓存，元素类型为type指针类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaf97a19ddb43b97be82103097ecad127b" title="根据树的序列进行反序列化为一个完整的树">splaylnk_deserialize</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga0d09988d46c22176f1f37ad3da562781" title="判断树是否可以序列化">splaylnk_serialable</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l01039">1039</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaf97a19ddb43b97be82103097ecad127b"></a><!-- doxytag: member="splaylnk.h::splaylnk_deserialize" ref="gaf97a19ddb43b97be82103097ecad127b" args="(root, buf, cnt, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define splaylnk_deserialize</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">buf, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">cnt, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;__splaylnk_deserialize(root, (char**)(buf), cnt, offset_of(type, member))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>根据树的序列进行反序列化为一个完整的树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>序列缓存，元素类型为type指针类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cnt</td><td>序列长度(元素数) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga3b4c9997a7ac852a073efff7579e298b" title="将树进行序列化为一个有序序列">splaylnk_serialize</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga0d09988d46c22176f1f37ad3da562781" title="判断树是否可以序列化">splaylnk_serialable</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l01052">1052</a>行定义。</p>

</div>
</div>
<hr/><h2>函数文档</h2>
<a class="anchor" id="ga96a0390c48c3efce2bfcc0d8e169d02c"></a><!-- doxytag: member="splaylnk.h::splaylnk_count" ref="ga96a0390c48c3efce2bfcc0d8e169d02c" args="(splaylnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t splaylnk_count </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>获取树的节点总数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回节点数 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga047a6df159da0ec6e9b865a81cdbd2ad" title="获取树的信息，包括节点数、深度、叶子数">splaylnk_get_info</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00530">530</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga184ab3bc7e5856c525fa69b1c0894dc7"></a><!-- doxytag: member="splaylnk.h::splaylnk_distance" ref="ga184ab3bc7e5856c525fa69b1c0894dc7" args="(splaylnk_iter first, splaylnk_iter last)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t splaylnk_distance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>first</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>last</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算两个节点的迭代距离 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">first</td><td>首节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">last</td><td>尾节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>以索引为例，2到4的距离是4 (4-2+1=3) </dd></dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回距离 </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00543">543</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga54bf3a666d7d44370c76f84ebb016dfa"></a><!-- doxytag: member="splaylnk.h::splaylnk_index_of" ref="ga54bf3a666d7d44370c76f84ebb016dfa" args="(splaylnk_root *root, splaylnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t splaylnk_index_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算迭代器的正向索引 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回索引 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gab24b1de0094f3caac4b04b22ecc9006e" title="计算迭代器的逆向索引">splaylnk_reverse_index_of</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00555">555</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gab24b1de0094f3caac4b04b22ecc9006e"></a><!-- doxytag: member="splaylnk.h::splaylnk_reverse_index_of" ref="gab24b1de0094f3caac4b04b22ecc9006e" args="(splaylnk_root *root, splaylnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t splaylnk_reverse_index_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算迭代器的逆向索引 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回索引 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga54bf3a666d7d44370c76f84ebb016dfa" title="计算迭代器的正向索引">splaylnk_index_of</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00568">568</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gab8d130bbc63ec59e932b631666893aeb"></a><!-- doxytag: member="splaylnk.h::splaylnk_depth" ref="gab8d130bbc63ec59e932b631666893aeb" args="(splaylnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t splaylnk_depth </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算树的深度 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回深度 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga047a6df159da0ec6e9b865a81cdbd2ad" title="获取树的信息，包括节点数、深度、叶子数">splaylnk_get_info</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00413">413</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gad3e72453d2045135cb2f4ea45e170ebf"></a><!-- doxytag: member="splaylnk.h::splaylnk_leafs" ref="gad3e72453d2045135cb2f4ea45e170ebf" args="(splaylnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t splaylnk_leafs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算树的叶子数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回叶子数 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga047a6df159da0ec6e9b865a81cdbd2ad" title="获取树的信息，包括节点数、深度、叶子数">splaylnk_get_info</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00454">454</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga047a6df159da0ec6e9b865a81cdbd2ad"></a><!-- doxytag: member="splaylnk.h::splaylnk_get_info" ref="ga047a6df159da0ec6e9b865a81cdbd2ad" args="(splaylnk_root *root, splaylnk_info *info)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void splaylnk_get_info </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structsplaylnk__info.html">splaylnk_info</a> *&#160;</td>
          <td class="paramname"><em>info</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>获取树的信息，包括节点数、深度、叶子数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">info</td><td>保存信息的结构体 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga96a0390c48c3efce2bfcc0d8e169d02c" title="获取树的节点总数">splaylnk_count</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gab8d130bbc63ec59e932b631666893aeb" title="计算树的深度">splaylnk_depth</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gad3e72453d2045135cb2f4ea45e170ebf" title="计算树的叶子数">splaylnk_leafs</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00481">481</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gada68906d6a788a0c39d67127f037e875"></a><!-- doxytag: member="splaylnk.h::splaylnk_splay" ref="gada68906d6a788a0c39d67127f037e875" args="(splaylnk_root *root, splaylnk_node *node, splaylnk_node *parent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void splaylnk_splay </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>parent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>对节点进行伸展调整 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>目标节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">parent</td><td>node的父节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>常用于节点插入、节点访问之后的调整 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordtype">int</span> insert_node(<a class="code" href="structsplaylnk__root.html" title="树根">splaylnk_root</a>* root, DATA* newly)
    {
        DATA* pdat;
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> cur;
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a>* p = &amp;root-&gt;<a class="code" href="structsplaylnk__root.html#ad1a7b82ff33bd008821a73024d7c3576" title="根节点">node</a>;
        
        <span class="comment">// 初始化新节点</span>
        <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gabefb35778426452b53bc6a2a462a7548" title="初始化节点">splaylnk_node_init</a>(&amp;newly-&gt;node);
        
        <span class="keywordflow">while</span> (*p) {
            cur = *p;
            pdat = container_of(cur, DATA, node);
            <span class="keywordflow">if</span> (pdat-&gt;data &gt; newly-&gt;data)
                p = &amp;cur-&gt;<a class="code" href="struct____splaylnk__node.html#aa0ed7aab4acf06a006c61aa96e4cd5a1" title="左子节点">left</a>;
            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pdat-&gt;data &lt; newly-&gt;data)
                p = &amp;cur-&gt;<a class="code" href="struct____splaylnk__node.html#adbcf818bcfba554a383e453874ad29a4" title="右子节点">right</a>;
            <span class="keywordflow">else</span> {
                <span class="comment">// 有相同值的节点，无法插入</span>
                <span class="keywordflow">return</span> 0;
            }
        }
        
        <span class="comment">// 链接新节点到树中</span>
        <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga23d333a84fee4942e550609f5cf08f6b" title="链接两个节点">splaylnk_link</a>(&amp;newly-&gt;node, cur, p);
        
        <span class="comment">// 伸展</span>
        <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gada68906d6a788a0c39d67127f037e875" title="对节点进行伸展调整">splaylnk_splay</a>(root, &amp;newly-&gt;<a class="code" href="structsplaylnk__root.html#ad1a7b82ff33bd008821a73024d7c3576" title="根节点">node</a>, cur);

        <span class="keywordflow">return</span> 1;
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga0a9f60007851a8069b5cd7968f2829cd" title="插入新节点(伸展)">splaylnk_insert</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga23d333a84fee4942e550609f5cf08f6b" title="链接两个节点">splaylnk_link</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaaa0524284fb74c268dde8f245219f34f" title="对节点进行半伸展调整">splaylnk_semisplay</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00135">135</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaaa0524284fb74c268dde8f245219f34f"></a><!-- doxytag: member="splaylnk.h::splaylnk_semisplay" ref="gaaa0524284fb74c268dde8f245219f34f" args="(splaylnk_root *root, splaylnk_node *node, splaylnk_node *parent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void splaylnk_semisplay </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>parent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>对节点进行半伸展调整 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>目标节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">parent</td><td>node的父节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>常用于节点插入、节点访问之后的调整 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordtype">int</span> insert_node(<a class="code" href="structsplaylnk__root.html" title="树根">splaylnk_root</a>* root, DATA* newly)
    {
        DATA* pdat;
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a> cur;
        <a class="code" href="struct____splaylnk__node.html" title="伸展树节点">splaylnk_iter</a>* p = &amp;root-&gt;<a class="code" href="structsplaylnk__root.html#ad1a7b82ff33bd008821a73024d7c3576" title="根节点">node</a>;
        
        <span class="comment">// 初始化新节点</span>
        <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gabefb35778426452b53bc6a2a462a7548" title="初始化节点">splaylnk_node_init</a>(&amp;newly-&gt;node);
        
        <span class="keywordflow">while</span> (*p) {
            cur = *p;
            pdat = container_of(cur, DATA, node);
            <span class="keywordflow">if</span> (pdat-&gt;data &gt; newly-&gt;data)
                p = &amp;cur-&gt;<a class="code" href="struct____splaylnk__node.html#aa0ed7aab4acf06a006c61aa96e4cd5a1" title="左子节点">left</a>;
            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pdat-&gt;data &lt; newly-&gt;data)
                p = &amp;cur-&gt;<a class="code" href="struct____splaylnk__node.html#adbcf818bcfba554a383e453874ad29a4" title="右子节点">right</a>;
            <span class="keywordflow">else</span> {
                <span class="comment">// 有相同值的节点，无法插入</span>
                <span class="keywordflow">return</span> 0;
            }
        }
        
        <span class="comment">// 链接新节点到树中</span>
        <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga23d333a84fee4942e550609f5cf08f6b" title="链接两个节点">splaylnk_link</a>(&amp;newly-&gt;node, cur, p);
        
        <span class="comment">// 半伸展</span>
        <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaaa0524284fb74c268dde8f245219f34f" title="对节点进行半伸展调整">splaylnk_semisplay</a>(root, &amp;newly-&gt;<a class="code" href="structsplaylnk__root.html#ad1a7b82ff33bd008821a73024d7c3576" title="根节点">node</a>, cur);

        <span class="keywordflow">return</span> 1;
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga0a9f60007851a8069b5cd7968f2829cd" title="插入新节点(伸展)">splaylnk_insert</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga23d333a84fee4942e550609f5cf08f6b" title="链接两个节点">splaylnk_link</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaaa0524284fb74c268dde8f245219f34f" title="对节点进行半伸展调整">splaylnk_semisplay</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00176">176</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga5a5a89278bf4369487a3fbd73fa76f3f"></a><!-- doxytag: member="splaylnk.h::splaylnk_erase" ref="ga5a5a89278bf4369487a3fbd73fa76f3f" args="(splaylnk_root *root, splaylnk_node *entry)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void splaylnk_erase </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>entry</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>移除某个节点(伸展) </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">entry</td><td>待移除节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00213">213</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga967ec8dd9063af617b682ea2760f1829"></a><!-- doxytag: member="splaylnk.h::splaylnk_semierase" ref="ga967ec8dd9063af617b682ea2760f1829" args="(splaylnk_root *root, splaylnk_node *entry)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void splaylnk_semierase </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>entry</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>移除某个节点(半伸展) </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">entry</td><td>待移除节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00250">250</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaf8b8aa25afe97aafae97b716b29ef460"></a><!-- doxytag: member="splaylnk.h::splaylnk_erases" ref="gaf8b8aa25afe97aafae97b716b29ef460" args="(splaylnk_root *root, splaylnk_iter begin, splaylnk_iter end, splaylnk_pr1 erase_handler)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void splaylnk_erases </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gac07a47df24523e66c8f37863d68b3d59">splaylnk_pr1</a>&#160;</td>
          <td class="paramname"><em>erase_handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>移除区域内的节点(伸展) </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根</td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">erase_handler</td><td>移除响应函数，通常用于监视和释放节点，可以传递NULL, 表示不为删除的节点调用响应来处理 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>函数会为每一个被移除的节点调用erase_handler来处理节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga7ce5153a6d1b663eae23b1afcf97d0c7" title="清空树">splaylnk_clear</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00286">286</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaabe47843d251d2e8d3d9560e163af0ef"></a><!-- doxytag: member="splaylnk.h::splaylnk_semierases" ref="gaabe47843d251d2e8d3d9560e163af0ef" args="(splaylnk_root *root, splaylnk_iter begin, splaylnk_iter end, splaylnk_pr1 erase_handler)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void splaylnk_semierases </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gac07a47df24523e66c8f37863d68b3d59">splaylnk_pr1</a>&#160;</td>
          <td class="paramname"><em>erase_handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>移除区域内的节点(半伸展) </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根</td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">erase_handler</td><td>移除响应函数，通常用于监视和释放节点，可以传递NULL, 表示不为删除的节点调用响应来处理 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>函数会为每一个被移除的节点调用erase_handler来处理节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga7ce5153a6d1b663eae23b1afcf97d0c7" title="清空树">splaylnk_clear</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00303">303</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gac499691fdb6e46b0246fc7912c306282"></a><!-- doxytag: member="splaylnk.h::splaylnk_init" ref="gac499691fdb6e46b0246fc7912c306282" args="(splaylnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void splaylnk_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>初始化树根 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">root</td><td>目标树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="structsplaylnk__root.html" title="树根">splaylnk_root</a> r;
    <span class="comment">// 初始化</span>
    <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gac499691fdb6e46b0246fc7912c306282" title="初始化树根">splaylnk_init</a>(&amp;r);
</pre></div> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00312">312</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga328c554736cee464fd77d3e0e4135a05"></a><!-- doxytag: member="splaylnk.h::splaylnk_empty" ref="ga328c554736cee464fd77d3e0e4135a05" args="(splaylnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int splaylnk_empty </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断树是否为空 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span> (!<a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga328c554736cee464fd77d3e0e4135a05" title="判断树是否为空">splaylnk_empty</a>(&amp;r)) {
        ......
    }
</pre></div> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00331">331</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gad807475fbd018c7899fc328d891ce1e8"></a><!-- doxytag: member="splaylnk.h::splaylnk_singular" ref="gad807475fbd018c7899fc328d891ce1e8" args="(splaylnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int splaylnk_singular </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断树是否只有单个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span> (<a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gad807475fbd018c7899fc328d891ce1e8" title="判断树是否只有单个节点">splaylnk_singular</a>(&amp;r)) {
        ......
    }
</pre></div> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00355">355</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga0d09988d46c22176f1f37ad3da562781"></a><!-- doxytag: member="splaylnk.h::splaylnk_serialable" ref="ga0d09988d46c22176f1f37ad3da562781" args="(splaylnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int splaylnk_serialable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断树是否可以序列化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>即判断是否至少有一个节点 </dd></dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="comment">// 判断是否可以序列化</span>
    <span class="keywordflow">if</span> (<a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga0d09988d46c22176f1f37ad3da562781" title="判断树是否可以序列化">splaylnk_serialable</a>(&amp;r)) {
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#gab7b8f6f20db0f3e5681fd2184b1ae60c" title="type类型表头">slseq_head</a> seq;
        <span class="comment">// 分配序列缓存</span>
        DATA** buf = (DATA**)malloc(<span class="keyword">sizeof</span>(DATA*) * avl_cnt);
        <span class="comment">// 序列化</span>
        <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga3b4c9997a7ac852a073efff7579e298b" title="将树进行序列化为一个有序序列">splaylnk_serialize</a>(&amp;r, buf, DATA, node);
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga08213d0c7bcf381b466b18e3822c6934" title="初始化序列">SLSEQ_INIT_SERIAL</a>(&amp;seq, buf, avl_cnt);
        ......
        <span class="comment">// do something</span>
        ......
        <span class="comment">// 反序列化</span>
        <a class="code" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaf97a19ddb43b97be82103097ecad127b" title="根据树的序列进行反序列化为一个完整的树">splaylnk_deserialize</a>(&amp;r, buf, avl_cnt, DATA, node);
        <span class="comment">// 释放缓存</span>
        free(buf);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga3b4c9997a7ac852a073efff7579e298b" title="将树进行序列化为一个有序序列">splaylnk_serialize</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaf97a19ddb43b97be82103097ecad127b" title="根据树的序列进行反序列化为一个完整的树">splaylnk_deserialize</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00389">389</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga208a3a7318ac6710042ecdc877368ef2"></a><!-- doxytag: member="splaylnk.h::splaylnk_left" ref="ga208a3a7318ac6710042ecdc877368ef2" args="(splaylnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_left </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到左子节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回左子节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga83961643a16aafa16240f70e67960bc1" title="得到右子节点">splaylnk_right</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00401">401</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga83961643a16aafa16240f70e67960bc1"></a><!-- doxytag: member="splaylnk.h::splaylnk_right" ref="ga83961643a16aafa16240f70e67960bc1" args="(splaylnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_right </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到右子节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回右子节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga208a3a7318ac6710042ecdc877368ef2" title="得到左子节点">splaylnk_left</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00413">413</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga59c8e5d7719e7d97ef4d7b15ac31a4ff"></a><!-- doxytag: member="splaylnk.h::splaylnk_parent" ref="ga59c8e5d7719e7d97ef4d7b15ac31a4ff" args="(splaylnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_parent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到父节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回父节点 </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00424">424</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gacda2bc982d5a1762266955df6ae730b1"></a><!-- doxytag: member="splaylnk.h::splaylnk_is_root" ref="gacda2bc982d5a1762266955df6ae730b1" args="(splaylnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int splaylnk_is_root </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断当前节点是否是根节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>是根节点 </td></tr>
    <tr><td class="paramname">0</td><td>不是根节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00437">437</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga07e12040dce0fbf4e87bb924cf43614b"></a><!-- doxytag: member="splaylnk.h::splaylnk_is_leaf" ref="ga07e12040dce0fbf4e87bb924cf43614b" args="(splaylnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int splaylnk_is_leaf </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断当前节点是否是叶子节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>是叶子节点 </td></tr>
    <tr><td class="paramname">0</td><td>不是叶子节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00450">450</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga23d333a84fee4942e550609f5cf08f6b"></a><!-- doxytag: member="splaylnk.h::splaylnk_link" ref="ga23d333a84fee4942e550609f5cf08f6b" args="(splaylnk_iter newly, splaylnk_iter parent, splaylnk_iter *plink)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void splaylnk_link </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>newly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> *&#160;</td>
          <td class="paramname"><em>plink</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>链接两个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">newly</td><td>新节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">parent</td><td>父节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">plink</td><td>父节点对应孩子指针。若newly加入parent的左子，则plink指向 parent的left成员，若newly加入parent的右子，则plink指向 parent的right成员 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>链接newly和parent节点 </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00466">466</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga0bc6c60eab55d8b1ff543b3bbd430277"></a><!-- doxytag: member="splaylnk.h::splaylnk_set_parent_if" ref="ga0bc6c60eab55d8b1ff543b3bbd430277" args="(splaylnk_node *node, splaylnk_node *parent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void splaylnk_set_parent_if </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>parent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>仅在node不为空时，设置node的父节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">parent</td><td>新的父节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00483">483</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gabefb35778426452b53bc6a2a462a7548"></a><!-- doxytag: member="splaylnk.h::splaylnk_node_init" ref="gabefb35778426452b53bc6a2a462a7548" args="(splaylnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void splaylnk_node_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>初始化节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">node</td><td>指定节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00495">495</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaf66fad4729c1d2764ec32eee101b89d7"></a><!-- doxytag: member="splaylnk.h::splaylnk_iter_replace" ref="gaf66fad4729c1d2764ec32eee101b89d7" args="(splaylnk_root *root, splaylnk_iter victim, splaylnk_iter newly)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void splaylnk_iter_replace </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>victim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>newly</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>用新节点替换旧节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">victim</td><td>受害目标节点 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">newly</td><td>新节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00510">510</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaf49efefae965d599b54b7006507430da"></a><!-- doxytag: member="splaylnk.h::splaylnk_replace" ref="gaf49efefae965d599b54b7006507430da" args="(splaylnk_root *victim, splaylnk_root *newly)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void splaylnk_replace </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>victim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>newly</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>用新的树根替换旧树根 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">victim</td><td>受害目标树根 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">newly</td><td>新树根 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00538">538</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga9d10b0aaef216b49f5f3b979746c130b"></a><!-- doxytag: member="splaylnk.h::splaylnk_swap" ref="ga9d10b0aaef216b49f5f3b979746c130b" args="(splaylnk_root *a, splaylnk_root *b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void splaylnk_swap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>交换两个树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">a</td><td>第一个树 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">b</td><td>第二个树 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00550">550</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa1f8902531ce41d20ed3fd88d6f8de69"></a><!-- doxytag: member="splaylnk.h::splaylnk_exist" ref="gaa1f8902531ce41d20ed3fd88d6f8de69" args="(splaylnk_root *root, splaylnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API int splaylnk_exist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断一个节点是否存在于树中 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>指定节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>存在 </td></tr>
    <tr><td class="paramname">0</td><td>不存在 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00332">332</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga8ad8cae719494a3f15d181e8b9f4dc5b"></a><!-- doxytag: member="splaylnk.h::splaylnk_at" ref="ga8ad8cae719494a3f15d181e8b9f4dc5b" args="(splaylnk_root *root, size_t index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_at </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到正向索引对应的节点的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>指定正向索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga2588af8914cc7c4399ca3b4dcd3a8d1e" title="得到逆向索引对应的节点的迭代器">splaylnk_reverse_at</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00574">574</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga2588af8914cc7c4399ca3b4dcd3a8d1e"></a><!-- doxytag: member="splaylnk.h::splaylnk_reverse_at" ref="ga2588af8914cc7c4399ca3b4dcd3a8d1e" args="(splaylnk_root *root, size_t index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_reverse_at </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到逆向索引对应的节点的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>指定逆向索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga8ad8cae719494a3f15d181e8b9f4dc5b" title="得到正向索引对应的节点的迭代器">splaylnk_at</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00588">588</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga4ea94db03f94aba84fb246f474a87df4"></a><!-- doxytag: member="splaylnk.h::splaylnk_front" ref="ga4ea94db03f94aba84fb246f474a87df4" args="(splaylnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_front </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到树的最左端节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gab9dc4ef36e511ad52d1f16c167b1facd" title="得到树的最右端节点">splaylnk_back</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00345">345</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gab9dc4ef36e511ad52d1f16c167b1facd"></a><!-- doxytag: member="splaylnk.h::splaylnk_back" ref="gab9dc4ef36e511ad52d1f16c167b1facd" args="(splaylnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_back </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到树的最右端节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga4ea94db03f94aba84fb246f474a87df4" title="得到树的最左端节点">splaylnk_front</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00359">359</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga2e0c221b5e448b08815f57083ab7f88d"></a><!-- doxytag: member="splaylnk.h::splaylnk_begin" ref="ga2e0c221b5e448b08815f57083ab7f88d" args="(splaylnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_begin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向正向起始位置的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga974718d49f7e2ffec9a0512f75144d10" title="得到指向正向终止位置的迭代器">splaylnk_end</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga195070ea85dfd413a26d9d060cd0ec5c" title="得到当前迭代器的正向终止位置">splaylnk_end_of</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gab60f4495e69b5698230fd1e6f4f655ec" title="得到指向逆向起始位置的迭代器">splaylnk_rbegin</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga35ce6d814ceb12ede0d7ce2dc6c319f4" title="得到指向逆向终止位置的迭代器">splaylnk_rend</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00618">618</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga974718d49f7e2ffec9a0512f75144d10"></a><!-- doxytag: member="splaylnk.h::splaylnk_end" ref="ga974718d49f7e2ffec9a0512f75144d10" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向正向终止位置的迭代器 </p>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回迭代器，永远返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga2e0c221b5e448b08815f57083ab7f88d" title="得到指向正向起始位置的迭代器">splaylnk_begin</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga195070ea85dfd413a26d9d060cd0ec5c" title="得到当前迭代器的正向终止位置">splaylnk_end_of</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gab60f4495e69b5698230fd1e6f4f655ec" title="得到指向逆向起始位置的迭代器">splaylnk_rbegin</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga35ce6d814ceb12ede0d7ce2dc6c319f4" title="得到指向逆向终止位置的迭代器">splaylnk_rend</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00629">629</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga195070ea85dfd413a26d9d060cd0ec5c"></a><!-- doxytag: member="splaylnk.h::splaylnk_end_of" ref="ga195070ea85dfd413a26d9d060cd0ec5c" args="(splaylnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_end_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前迭代器的正向终止位置 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga2e0c221b5e448b08815f57083ab7f88d" title="得到指向正向起始位置的迭代器">splaylnk_begin</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga974718d49f7e2ffec9a0512f75144d10" title="得到指向正向终止位置的迭代器">splaylnk_end</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00641">641</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gab60f4495e69b5698230fd1e6f4f655ec"></a><!-- doxytag: member="splaylnk.h::splaylnk_rbegin" ref="gab60f4495e69b5698230fd1e6f4f655ec" args="(splaylnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_rbegin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向逆向起始位置的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga35ce6d814ceb12ede0d7ce2dc6c319f4" title="得到指向逆向终止位置的迭代器">splaylnk_rend</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga6df1dae359180f19397c1ef01bbe1ccc" title="得到当前迭代器的逆向终止位置">splaylnk_rend_of</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga2e0c221b5e448b08815f57083ab7f88d" title="得到指向正向起始位置的迭代器">splaylnk_begin</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga974718d49f7e2ffec9a0512f75144d10" title="得到指向正向终止位置的迭代器">splaylnk_end</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00653">653</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga35ce6d814ceb12ede0d7ce2dc6c319f4"></a><!-- doxytag: member="splaylnk.h::splaylnk_rend" ref="ga35ce6d814ceb12ede0d7ce2dc6c319f4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_rend </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向逆向终止位置的迭代器 </p>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回迭代器，永远返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gab60f4495e69b5698230fd1e6f4f655ec" title="得到指向逆向起始位置的迭代器">splaylnk_rbegin</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga6df1dae359180f19397c1ef01bbe1ccc" title="得到当前迭代器的逆向终止位置">splaylnk_rend_of</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga2e0c221b5e448b08815f57083ab7f88d" title="得到指向正向起始位置的迭代器">splaylnk_begin</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga974718d49f7e2ffec9a0512f75144d10" title="得到指向正向终止位置的迭代器">splaylnk_end</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00664">664</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga6df1dae359180f19397c1ef01bbe1ccc"></a><!-- doxytag: member="splaylnk.h::splaylnk_rend_of" ref="ga6df1dae359180f19397c1ef01bbe1ccc" args="(splaylnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_rend_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前迭代器的逆向终止位置 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gab60f4495e69b5698230fd1e6f4f655ec" title="得到指向逆向起始位置的迭代器">splaylnk_rbegin</a>, <a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga35ce6d814ceb12ede0d7ce2dc6c319f4" title="得到指向逆向终止位置的迭代器">splaylnk_rend</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00676">676</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga6fc0567f0310442cab65da24be50f6c6"></a><!-- doxytag: member="splaylnk.h::splaylnk_next" ref="ga6fc0567f0310442cab65da24be50f6c6" args="(splaylnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_next </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前节点的中序后继节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cur</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回后继节点，若无后继，则返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga31c7ab1c0c602384c51537bc8c36cc4b" title="得到当前节点的中序前驱节点">splaylnk_prev</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00373">373</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga31c7ab1c0c602384c51537bc8c36cc4b"></a><!-- doxytag: member="splaylnk.h::splaylnk_prev" ref="ga31c7ab1c0c602384c51537bc8c36cc4b" args="(splaylnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_prev </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前节点的中序前驱节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cur</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回前驱节点，若无前驱，则返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#ga6fc0567f0310442cab65da24be50f6c6" title="得到当前节点的中序后继节点">splaylnk_next</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00393">393</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga270dd16e098a16b9631eb0a8f712ffb4"></a><!-- doxytag: member="splaylnk.h::splaylnk_advance" ref="ga270dd16e098a16b9631eb0a8f712ffb4" args="(splaylnk_iter cur, int dist)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a> splaylnk_advance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____splaylnk__node.html">splaylnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dist</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>给迭代器增加一段距离或减小一段距离 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cur</td><td>迭代器 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dist</td><td>增加的距离。正数时，表示增加；负数时，表示减小 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>splaylnk_iter 返回新迭代器 </dd></dl>

<p>在文件<a class="el" href="splaylnk_8c_source.html">splaylnk.c</a>第<a class="el" href="splaylnk_8c_source.html#l00320">320</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga7ce5153a6d1b663eae23b1afcf97d0c7"></a><!-- doxytag: member="splaylnk.h::splaylnk_clear" ref="ga7ce5153a6d1b663eae23b1afcf97d0c7" args="(splaylnk_root *root, splaylnk_pr1 erase_handler)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void splaylnk_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsplaylnk__root.html">splaylnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gac07a47df24523e66c8f37863d68b3d59">splaylnk_pr1</a>&#160;</td>
          <td class="paramname"><em>erase_handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>清空树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">erase_handler</td><td>移除响应函数，通常用于监视和释放节点，可以传递NULL, 表示不为删除的节点调用响应来处理 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>函数会为每一个被移除的节点调用erase_handler来处理节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE4_xBC_xB8_xE5_xB1_x95_xE6_xA0_x91.html#gaf8b8aa25afe97aafae97b716b29ef460" title="移除区域内的节点(伸展)">splaylnk_erases</a> </dd></dl>

<p>在文件<a class="el" href="splaylnk_8h_source.html">splaylnk.h</a>第<a class="el" href="splaylnk_8h_source.html#l00730">730</a>行定义。</p>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>类型定义</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2015年七月16日 星期四 12:00:43 for Navo Portable Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
